/*
 * Created on 13/Dez/2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package libjdc.dc.protocol;

import java.text.MessageFormat;

/**
 * @author Daniel Botelho
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public interface Protocol {
    public final static char COMMAND_END_CHAR='|';
    public final static char COMMAND_START_CHAR='$';
    public final static char COMMAND_SEP_CHAR=' ' ;
    public static final String COMMAND_USER_SEP = "$$";

    public static final String DC_S_MESSAGE_CHAT_START = "<";
    public static final String DC_S_MESSAGE_CHAT_END = "> ";
    public static final String DC_S_TIMESTAMPS_START = "[";
    public static final String DC_S_TIMESTAMPS_END = "]";
    public static final String DC_S_MESSAGE_SEARCH = COMMAND_START_CHAR+"Search ";
    public static final String DC_S_MESSAGE_MYINFO = COMMAND_START_CHAR+"MyINFO ";
    public static final String DC_S_MESSAGE_HELLO = COMMAND_START_CHAR+"Hello ";
    public static final String DC_S_MESSAGE_QUIT = COMMAND_START_CHAR+"Quit ";
    public static final String DC_S_MESSAGE_NICKLIST = COMMAND_START_CHAR+"NickList ";
    public static final String DC_S_MESSAGE_OPLIST = COMMAND_START_CHAR+"OpList ";
    public static final String DC_S_MESSAGE_CONNECTTOME = COMMAND_START_CHAR+"ConnectToMe ";
    public static final String DC_S_MESSAGE_KEY = COMMAND_START_CHAR+"Key ";
    public static final String DC_S_MESSAGE_HUBNAME = COMMAND_START_CHAR+"HubName ";
    public static final String DC_S_MESSAGE_LOCK = COMMAND_START_CHAR+"Lock ";
    public static final String DC_S_MESSAGE_TO = COMMAND_START_CHAR+"To: ";
    public static final String DC_S_MESSAGE_FROM = " From: ";
    public static final String DC_S_MESSAGE_FORCEMOVE = COMMAND_START_CHAR+"ForceMove ";
    public static final String DC_S_MESSAGE_REVCONNECTTOME = COMMAND_START_CHAR+"RevConnectToMe ";
    public static final String DC_S_MESSAGE_SR = COMMAND_START_CHAR+"SR ";    
    public static final String DC_S_MESSAGE_ERROR = COMMAND_START_CHAR+"Error ";
    public static final String DC_S_MESSAGE_GETLISTLEN = COMMAND_START_CHAR+"GetListLen";
    public static final String DC_S_MESSAGE_VALIDATEDENIDE = COMMAND_START_CHAR+"ValidateDenide";  //hub login failed ...
    public static final String DC_S_MESSAGE_HUBISFULL = COMMAND_START_CHAR+"HubIsFull";
    public static final String DC_S_MESSAGE_LISTLEN = COMMAND_START_CHAR+"ListLen ";
    public static final String DC_S_MESSAGE_SEND = COMMAND_START_CHAR+"Send";
    public static final String DC_S_MESSAGE_GETINFO = COMMAND_START_CHAR+"GetINFO ";
    public static final String DC_S_MESSAGE_PING = COMMAND_START_CHAR+"Ping";
    public static final String DC_S_MESSAGE_GETPASS = COMMAND_START_CHAR+"GetPass";
    public static final String DC_S_MESSAGE_BADPASS = COMMAND_START_CHAR+"BadPass";
    public static final String DC_S_MESSAGE_LOGEDIN = COMMAND_START_CHAR+"LogedIn";
    public static final String DC_S_MESSAGE_CANCEL = COMMAND_START_CHAR+"Cancel";
    public static final String DC_S_MESSAGE_CANCELED = COMMAND_START_CHAR+"Canceled";
    public static final String DC_S_MESSAGE_SUPPORTS = COMMAND_START_CHAR+"Supports ";
    public static final String DC_S_MESSAGE_CAPABILITIES = COMMAND_START_CHAR+"Capabilities ";
    public static final String DC_S_MESSAGE_HUB_TOPIC = COMMAND_START_CHAR+"HubTopic ";
    public static final String DC_S_MESSAGE_GET_NET_INFO = COMMAND_START_CHAR+"GetNetInfo";
    public static final String DC_S_MESSAGE_USER_IP = COMMAND_START_CHAR+"UserIP ";
    public static final String DC_S_MESSAGE_HUBINFO = COMMAND_START_CHAR+"HubINFO ";
    
// ignored messages
    public static final String DC_S_MESSAGE_MULTISEARCH = COMMAND_START_CHAR+"MultiSearch ";
    public static final String DC_S_MESSAGE_USER_COMMAND = COMMAND_START_CHAR+"UserCommand ";
    
    public static final MessageFormat USERIP_QUERY_PARSER = new MessageFormat(DC_S_MESSAGE_USER_IP+"{0}|");
    public static final MessageFormat USERIP_REPLY_PARSER = new MessageFormat(DC_S_MESSAGE_USER_IP+"{0} {1}|");
    public static final MessageFormat MYINFO_PARSER = new MessageFormat(DC_S_MESSAGE_MYINFO+"$ALL {0} {1}${5}${2}${3}${4}$|");
    public static final MessageFormat KEY_PARSER = new MessageFormat(DC_S_MESSAGE_KEY+"{0}|");
    public static final MessageFormat HELLO_PARSER = new MessageFormat(DC_S_MESSAGE_HELLO+"{0}|");
    public static final MessageFormat HUBNAME_PARSER = new MessageFormat(DC_S_MESSAGE_HUBNAME+"{0}|");
    public static final MessageFormat VALIDATE_NICK_PARSER = new MessageFormat("$ValidateNick {0}|");
    public static final MessageFormat MY_PASS_PARSER = new MessageFormat("$MyPass {0}|");
    public static final MessageFormat VERSION_PARSER = new MessageFormat("$Version {0}|");
    public static final MessageFormat GET_INFO_PARSER = new MessageFormat("$GetINFO {0} {1}|");
    public static final MessageFormat PM_PARSER = new MessageFormat("$To:{0} From: {1} $<{1}> {2}|");
    public static final MessageFormat PUBLIC_M_PARSER = new MessageFormat("<{0}> {1}|");
    public static final MessageFormat LOCK_PARSER = new MessageFormat("$Lock {0} Pk={1}|");
    public static final MessageFormat QUIT_PARSER = new MessageFormat("$Quit {0}|");
    public static final MessageFormat GETINFO_PARSER = new MessageFormat("$GetINFO {0} {1}|");
    public static final MessageFormat CONNECTTOME_PARSER = new MessageFormat("$ConnectToMe {0} {1}:{2}|");
    public static final MessageFormat BOTINFO_PARSER = new MessageFormat("$BotINFO {0}|");
    public static final MessageFormat HUBINFO_PARSER = new MessageFormat("$HubINFO {0}${1}${2}${3}${4}${5}${6}${7}${8}|");
    public static final MessageFormat SUPPORTS_PARSER = new MessageFormat(DC_S_MESSAGE_SUPPORTS+"{0}|");
    
}
